const GLOBAL_ACT_FIELD_HIDE = [
    "id",
    "create_by",
    "create_start_user_type",
    "create_time",
    "update_by",
    "update_start_user_type",
    "update_time",
    "act_proc_def_key",
    "act_proc_inst_id",
    "act_proc_state",
]
const GLOBAL_ACT_TASK_FIELD_HIDE = [
    "act_proc_task_def_key",
    "acr_proc_task_state",
    "act_proc_task_inst_id",
]

function columnDisplay(hideFields,column){
    if (hideFields.includes(column.prop)) {
        column.display = false;
    }
}

function autoActMainForm(option) {
    for (let i = 0; i < option.column.length; i++) {
        let column = option.column[i];
        columnDisplay(GLOBAL_ACT_FIELD_HIDE,column)
    }
}
function autoActTaskForm(option){
    for (let i = 0; i < option.column.length; i++) {
        let column = option.column[i];
        columnDisplay(GLOBAL_ACT_TASK_FIELD_HIDE,column)
        columnDisplay(GLOBAL_ACT_FIELD_HIDE,column)
    }
}

const startActFormTools = {
    autoActMainForm,
    autoActTaskForm
}
export default startActFormTools